import {createRouter, createWebHashHistory} from 'vue-router'

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: () => import('/src/views/Home')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('/src/views/About')
  },
  {
    path: '/test',
    name: 'Test',
    component: () => import('/src/views/Test')
  },
  {
    path: '/main',
    component: () => import('/src/views/main'),
    children:[
      {
        path:'home',
        component: () => import('/src/views/main/home'),
      },
      {
        path:'active',
        component: () => import('/src/views/main/active'),
      },
      {
        path:'shop',
        component: () => import('/src/views/main/shop'),
      },
      {
        path:'me',
        component: () => import('/src/views/main/me'),
      },
    ]
  },
  {
    path: '/',
    redirect: '/main'
  }

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
